<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>


<div class="comments">
  <s:action name="listReply" id="listReply" namespace="/">
    <s:param name="itemId" value="item.id"/>
  </s:action>
  <h5>
    共有评论<span id="cnum"><s:property value="#listReply.replies.size"/></span>条
		<span style="margin-left:250px;margin-right:-50px">
			<button onclick="openCommentDialog();">我要评论</button>
		</span>
  </h5>

  <div class="review_list_sty">

    <s:iterator id="reply" value="#listReply.replies">
      <dl>
        <dt>
          <span></span>
          <img width="16px" height="16px" src="../image/common/user-star.png"
               alt="">
          <a target="_blank" href="#">${reply.user.username}</a>
          给予的评价

				<span title="5">
					<c:choose>
            <c:when test="${reply.rate == 1}">
              <img id="rating_star" height="20" alt="" src="../image/common/1stars.png"/>
            </c:when>
            <c:when test="${reply.rate == 2}">
              <img id="rating_star" height="20" alt="" src="../image/common/2stars.png"/>
            </c:when>
            <c:when test="${reply.rate == 3}">
              <img id="rating_star" height="20" alt="" src="../image/common/3stars.png"/>
            </c:when>
            <c:when test="${reply.rate == 4}">
              <img id="rating_star" height="20" alt="" src="../image/common/4stars.png"/>
            </c:when>
            <c:otherwise>
              <img id="rating_star" height="20" alt="" src="../image/common/5stars.png"/>
            </c:otherwise>
          </c:choose>
				</span>

        </dt>
        <dd class="content">
          <p>${reply.message}</p>
        </dd>
        <dd class="left">时间：${reply.time}</dd>
        <dd class="right"></dd>
        <dd style="clear:both"></dd>
      </dl>
    </s:iterator>
  </div>
</div>